#ifndef APPSEARCHRESPONSECMD_H
#define APPSEARCHRESPONSECMD_H

#include "DataType/UserStruct.h"
#include "Command/BaseCmd.h"
#include "Protocol/CloudProtocol.h"

class AppSearchResponseCmd : public BaseCmd
{
     Q_OBJECT

public:

    enum{FunctionCode = CloudProtocol::AppSearchResponse};

    Q_INVOKABLE explicit AppSearchResponseCmd(QObject *parent = 0);

    Package toPackage();
    void unPackage(Package package);

    QString mac() const;
    void setMac(const QString &mac);

    quint16 port() const;
    void setPort(const quint16 &port);

    QList<UserStruct> userList() const;
    void setUserList(const QList<UserStruct> &userList);

    QByteArray strUserToArrayUser(UserStruct user);

private:
    QString m_mac;
    quint16 m_port;
    QList<UserStruct> m_userList;

};

#endif // APPSEARCHRESPONSECMD_H
